cmake_minimum_required (VERSION 2.6)

cmake_policy (VERSION 2.8)

project (MagiCOM)

list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)

include(FindPkgConfig)

list(APPEND VALA_PACKAGES glib-2.0)

list(APPEND VALA_PACKAGES gio-2.0)

if(WIN32)
    list(APPEND VALA_PACKAGES gio-windows-2.0)
else()
    list(APPEND VALA_PACKAGES gio-unix-2.0)
endif()

list(APPEND VALA_PACKAGES gobject-2.0)

list(APPEND VALA_PACKAGES gtk+-3.0)

list(APPEND VALA_PACKAGES gee-0.8)

list(APPEND VALA_PACKAGES libserialport)

pkg_check_modules(DEPS REQUIRED ${VALA_PACKAGES})

set(SUB_DIRS tinyc auto_test data/interface src)

foreach (SUB_DIR ${SUB_DIRS})
    add_subdirectory (${SUB_DIR})
endforeach ()
